import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import NotFoundComponent from './components/NotFoundComponent.vue' 
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children: [
        {path:'/summary',name:'summary',component: () => import(/* webpackChunkName: "Summary" */ './views/summary/index.vue')},

        {path:'/category',name:'category_list',component: () => import(/* webpackChunkName: "Category" */ './views/category/index.vue')},
        {path:'/category/add',name:'category_add',component: () => import(/* webpackChunkName: "CategoryAdd" */ './views/category/add.vue')},

        {path:'/activity',name:'activity_index',component: () => import(/* webpackChunkName: "ActvivityIndex" */ './views/activity/index.vue')},
        {path:'/activity/add',name:'activity_add',component: () => import(/* webpackChunkName: "ActvivityAdd" */ './views/activity/add.vue')},
        {path:'/activity/city',name:'activity_city',component: () => import(/* webpackChunkName: "ActvivityCity" */ './views/activity/city.vue')},

        {path:'/user',name:'user',component: () => import(/* webpackChunkName: "UserIndex" */ './views/user/index.vue')},

        {path:'/volunteer',name:'volunteer',component: () => import(/* webpackChunkName: "VolunteerIndex" */ './views/volunteer/index.vue')},
        {path:'/volunteer/auditing',name:'volunteer_auditing',component: () => import(/* webpackChunkName: "VolunteerAuditing" */ './views/volunteer/auditing.vue')},
        {path:'/volunteer/jobs',name:'volunteer_jobs',component: () => import(/* webpackChunkName: "VolunteerJobs" */ './views/volunteer/jobs.vue')},
      ]
    },
    {
      path: '/user/login',
      name: 'user_login',
      component: () => import(/* webpackChunkName: "UserLogin" */ './views/user/login.vue'),
      meta: { skip: 123 }
    },
    { path: '*', component: NotFoundComponent }
//     {
//       path: '/about',
//       name: 'about',
//       // route level code-splitting
//       // this generates a separate chunk (about.[hash].js) for this route
//       // which is lazy-loaded when the route is visited.
//       component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
//     }
  ]
})

